function tianchai_showmenu(params){
	checkFocus();
	var sel, selection;
	var str = '', strdialog = 0,tag="codes";
	var ctrlid = editorid + (params ? '_cst' + params + '_' : '_') + tag;
	var menu = $(ctrlid + '_menu');
	var pos = [0, 0];
	var menuwidth = 550;
	var menupos = '00';
	var menutype = 'menu';

	if(BROWSER.ie) {
		sel = wysiwyg ? editdoc.selection.createRange() : document.selection.createRange();
		pos = getCaret();
	}

	selection = sel ? (wysiwyg ? sel.htmlText : sel.text) : getSel();

	var textarea_str='<textarea id="tianchai_text" style="width:510px; height:50px"></textarea>';
	str+=textarea_str;
	menutype = 'win';
	var menu = document.createElement('div');
	menu.id = ctrlid + '_menu';
	menu.style.display = 'none';
	menu.className = 'p_pof upf';
	menu.style.width = menuwidth + 'px';
	if(menupos == '00') {
			menu.className = 'fwinmask';
			s = '<table width="100%" cellpadding="0" cellspacing="0" class="fwin"><tr><td class="t_l"></td><td class="t_c"></td><td class="t_r"></td></tr><tr><td class="m_l">&nbsp;&nbsp;</td><td class="m_c">'
				+ '<h3 class="flb"><em>' + tcyoukutitle +  '</em><span><a onclick="hideMenu(\'\', \'win\');return false;" class="flbc" href="javascript:;">'+tcyoukushut+'</a></span></h3><div class="c"><a href="http://v.youku.com/v_show/id_XNTI0MjY2MzU2.html" target="_blank">http://v.youku.com/v_show/id_XNTI0MjY2MzU2.html</a></div><div class="c">' + str + '</div>'
				+ '<p class="o pns"><button type="submit" id="' + ctrlid + '_submit" class="pn pnc"><strong>'+tcyoukusubmit+'</strong></button></p>'
				+ '</td><td class="m_r"></td></tr><tr><td class="b_l"></td><td class="b_c"></td><td class="b_r"></td></tr></table>';
		}
	menu.innerHTML = s;
	$(editorid + '_editortoolbar').appendChild(menu);
	showMenu({'ctrlid':ctrlid,'mtype':menutype,'evt':'click','duration':3,'cache':0,'drag':1,'pos':menupos});
	$("tianchai_text").focus();
	var objs = menu.getElementsByTagName('*');
	for(var i = 0; i < objs.length; i++) {
		_attachEvent(objs[i], 'keydown', function(e) {
			e = e ? e : event;
			obj = BROWSER.ie ? event.srcElement : e.target;
			if((obj.type == 'text' && e.keyCode == 13) || (obj.type == 'textarea' && e.ctrlKey && e.keyCode == 13)) {
				if($(ctrlid + '_submit') && tag != 'image') $(ctrlid + '_submit').click();
				doane(e);
			} else if(e.keyCode == 27) {
				hideMenu('', 'win');
				hideMenu();
				doane(e);
			}
		});
	}

	if($(ctrlid + '_submit')) $(ctrlid + '_submit').onclick = function() {
		checkFocus();
		if(BROWSER.ie && wysiwyg) {
			setCaret(pos[0]);
		}
		if(wysiwyg){
			$("tianchai_text").value=$("tianchai_text").value.replace(/</g,'&lt;').replace(/\r?\n/g, '<br />');
		}

		var tc_str = $("tianchai_text").value;
		if(tc_str.length > '13')
		{
			var tc_reg = new RegExp("[\.]","g");
			var tc_reg2 = new RegExp("[_]","g");
			var finalstr;
			tc_str = tc_str.replace(tc_reg,"/");
			tc_str = tc_str.replace(tc_reg2,"/");
			tc_arr = tc_str.split("/");
			for(tc_i=0;tc_i<tc_arr.length;tc_i++) 
			{
				if(tc_arr[tc_i].length == '13') 
				{
					finalstr = tc_arr[tc_i];
				}
			}
			$("tianchai_text").value = finalstr;
		}
		if($("tianchai_text").value!="")
			$("tianchai_text").value = "[tianchai_youku]" + $("tianchai_text").value+ "[/tianchai_youku]";
		insertText($("tianchai_text").value, 0, 0, false, sel);
		hideMenu('', 'win');
		hideMenu();
	}
}